package com.china.produce.jdk;

import lombok.extern.slf4j.Slf4j;
import java.lang.reflect.Proxy;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/12/9
 */
@Slf4j
public class Bike implements MoveAble{
    @Override
    public void go() {
        log.info("bike go !!!");
    }

    @Override
    public void test() {
        log.info("bike test !!!");
    }

    public static void main(String[] args) {

        MoveAble moveAble = (MoveAble) Proxy.newProxyInstance(Bike.class.getClassLoader(), new Class[]{MoveAble.class}, new CarTimeInvocationHandler(new Bike()));

        moveAble.test();
    }
}
